package com.example.demo.service;

import org.springframework.stereotype.Service;

@Service  // 这个注解让Spring自动发现并注册这个Bean
public class UserService {

    public String getUserName() {
        return "John Doe";
    }
}